package com.front.servlets;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class Disconnect extends HttpServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3039777008866529780L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		RequestDispatcher dispatcher = getServletContext()
				.getRequestDispatcher("/index.jsp");
		dispatcher.forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		HttpSession session = request.getSession(true);
		session.setAttribute("user", null);
		
		RequestDispatcher dispatcher = getServletContext()
				.getRequestDispatcher("/index.jsp");
		dispatcher.forward(request, response);
	}
}